home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 85 / CD Actual 85 Febrero 2004.iso / Experto / Apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252736_mod_imap.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-05-12  |  12.7 KB  |  341 lines

  1. <?xml version="1.0"?>
  2. <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
  3. <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
  4. <modulesynopsis metafile="mod_imap.xml.meta">
  5.  
  6. <name>mod_imap</name>
  7. <description>Server-side imagemap processing</description>
  8. <status>Base</status>
  9. <sourcefile>mod_imap.c</sourcefile>
  10. <identifier>imap_module</identifier>
  11.  
  12. <summary>
  13.     <p>This module processes <code>.map</code> files, thereby
  14.     replacing the functionality of the <code>imagemap</code> CGI
  15.     program. Any directory or document type configured to use the
  16.     handler <code>imap-file</code> (using either 
  17.     <directive module="mod_mime">AddHandler</directive> or
  18.     <directive module="core">SetHandler</directive>)
  19.     will be processed by this module.</p>
  20.  
  21.     <p>The following directive will activate files ending with
  22.     <code>.map</code> as imagemap files:</p>
  23.  
  24.     <example>AddHandler imap-file map</example>
  25.  
  26.     <p>Note that the following is still supported:</p>
  27.  
  28.     <example>AddType application/x-httpd-imap map</example>
  29.  
  30.     <p>However, we are trying to phase out "magic MIME types" so we
  31.     are deprecating this method.</p>
  32. </summary>
  33.  
  34. <section id="features"><title>New Features</title>
  35.  
  36.     <p>The imagemap module adds some new features that were not
  37.     possible with previously distributed imagemap programs.</p>
  38.  
  39.     <ul>
  40.       <li>URL references relative to the Referer: information.</li>
  41.  
  42.       <li>Default <code><base></code> assignment through a new map
  43.       directive <code>base</code>.</li>
  44.  
  45.       <li>No need for <code>imagemap.conf</code> file.</li>
  46.  
  47.       <li>Point references.</li>
  48.  
  49.       <li>Configurable generation of imagemap menus.</li>
  50.     </ul>
  51. </section>
  52.  
  53. <section id="imapfile"><title>Imagemap File</title>
  54.  
  55.     <p>The lines in the imagemap files can have one of several
  56.     formats:</p>
  57.  
  58.     <example>
  59.       directive value [<var>x</var>,<var>y</var> ...]<br />
  60.       directive value "<var>Menu text</var>" [<var>x</var>,<var>y</var>
  61.       ...]<br />
  62.       directive value <var>x</var>,<var>y</var> ... "<var>Menu text</var>"
  63.     </example>
  64.  
  65.     <p>The directive is one of <code>base</code>,
  66.     <code>default</code>, <code>poly</code>, <code>circle</code>,
  67.     <code>rect</code>, or <code>point</code>. The value is an
  68.     absolute or relative URL, or one of the special values listed
  69.     below. The coordinates are <code><var>x</var>,<var>y</var></code>
  70.     pairs separated by whitespace. The quoted text is used as the text of
  71.     the link if a imagemap menu is generated. Lines beginning with '#' are
  72.     comments.</p>
  73.  
  74.     <section id="imapfile.directives"><title>Imagemap File Directives</title>
  75.       <p>There are six directives allowed in the imagemap file. The
  76.       directives can come in any order, but are processed in the
  77.       order they are found in the imagemap file.</p>
  78.  
  79.       <dl>
  80.       <dt><code>base</code> Directive</dt>
  81.  
  82.       <dd><p>Has the effect of <code><base href="<var>value</var>">
  83.       </code>. The non-absolute URLs of the map-file are taken relative
  84.       to this value. The <code>base</code> directive overrides
  85.       <directive module="mod_imap">ImapBase</directive> as set in a
  86.       <code>.htaccess</code> file or in the server configuration files.
  87.       In the absence of an <directive>ImapBase</directive> configuration
  88.       directive, <code>base</code> defaults to
  89.       <code>http://server_name/</code>.</p>
  90.       <p><code>base_uri</code> is synonymous with <code>base</code>.
  91.       Note that a trailing slash on the URL is significant.</p></dd>
  92.  
  93.       <dt><code>default</code> Directive</dt>
  94.  
  95.       <dd>The action taken if the coordinates given do not fit any
  96.       of the <code>poly</code>, <code>circle</code> or
  97.       <code>rect</code> directives, and there are no
  98.       <code>point</code> directives. Defaults to <code>nocontent</code>
  99.       in the absence of an <directive module="mod_imap"
  100.       >ImapDefault</directive> configuration setting, causing a status
  101.       code of <code>204 No Content</code> to be returned. The client
  102.       should keep the same page displayed.</dd>
  103.  
  104.       <dt><code>poly</code> Directive</dt>
  105.  
  106.       <dd>Takes three to one-hundred points, and is obeyed if the
  107.       user selected coordinates fall within the polygon defined by
  108.       these points.</dd>
  109.  
  110.       <dt><code>circle</code></dt>
  111.  
  112.       <dd>Takes the center coordinates of a circle and a point on
  113.       the circle. Is obeyed if the user selected point is with the
  114.       circle.</dd>
  115.  
  116.       <dt><code>rect</code> Directive</dt>
  117.  
  118.       <dd>Takes the coordinates of two opposing corners of a
  119.       rectangle. Obeyed if the point selected is within this
  120.       rectangle.</dd>
  121.  
  122.       <dt><code>point</code> Directive</dt>
  123.  
  124.       <dd>Takes a single point. The point directive closest to the
  125.       user selected point is obeyed if no other directives are
  126.       satisfied. Note that <code>default</code> will not be
  127.       followed if a <code>point</code> directive is present and
  128.       valid coordinates are given.</dd>
  129.       </dl>
  130.     </section>
  131.  
  132.     <section id="imapfile.values"><title>Values</title>
  133.  
  134.       <p>The values for each of the directives can any of the following:</p>
  135.  
  136.       <dl>
  137.       <dt>a URL</dt>
  138.  
  139.       <dd><p>The URL can be relative or absolute URL. Relative URLs
  140.       can contain '..' syntax and will be resolved relative to the
  141.       <code>base</code> value.</p>
  142.       <p><code>base</code> itself will not resolved according to the
  143.       current value. A statement <code>base mailto:</code> will
  144.       work properly, though.</p></dd>
  145.  
  146.       <dt><code>map</code></dt>
  147.  
  148.       <dd>Equivalent to the URL of the imagemap file itself. No
  149.       coordinates are sent with this, so a menu will be generated
  150.       unless <directive module="mod_imap">ImapMenu</directive> is set to
  151.       <code>none</code>.</dd>
  152.  
  153.       <dt><code>menu</code></dt>
  154.       <dd>Synonymous with <code>map</code>.</dd>
  155.  
  156.       <dt><code>referer</code></dt>
  157.  
  158.       <dd>Equivalent to the URL of the referring document. Defaults
  159.       to <code>http://servername/</code> if no <code>Referer:</code>
  160.       header was present.</dd>
  161.  
  162.       <dt><code>nocontent</code></dt>
  163.  
  164.       <dd>Sends a status code of <code>204 No Content</code>,
  165.       telling the client to keep the same page displayed. Valid for
  166.       all but <code>base</code>.</dd>
  167.  
  168.       <dt><code>error</code></dt>
  169.  
  170.       <dd>Fails with a <code>500 Server Error</code>. Valid for all
  171.       but <code>base</code>, but sort of silly for anything but
  172.       <code>default</code>.</dd>
  173.       </dl>
  174.     </section>
  175.  
  176.     <section id="imapfile.coords"><title>Coordinates</title>
  177.  
  178.       <dl>
  179.       <dt><code>0,0 200,200</code></dt>
  180.  
  181.       <dd>A coordinate consists of an <var>x</var> and a <var>y</var>
  182.       value separated by a comma. The coordinates are separated
  183.       from each other by whitespace. To accommodate the way Lynx
  184.       handles imagemaps, should a user select the coordinate
  185.       <code>0,0</code>, it is as if no coordinate had been
  186.       selected.</dd>
  187.       </dl>
  188.  
  189.     </section>
  190.  
  191.     <section id="imapfile.quotedtext"><title>Quoted Text</title>
  192.  
  193.       <dl>
  194.       <dt><code>"<var>Menu Text</var>"</code></dt>
  195.  
  196.       <dd><p>After the value or after the coordinates, the line
  197.       optionally may contain text within double quotes. This string
  198.       is used as the text for the link if a menu is
  199.       generated:</p>
  200.  
  201.       <example>
  202.         <a href="http://foo.com/"><var>Menu text</var></a>
  203.       </example>
  204.  
  205.       <p>If no quoted text is present, the name of the link will be
  206.       used as the text:</p>
  207.  
  208.       <example>
  209.         <a href="http://foo.com/">http://foo.com</a>
  210.       </example>
  211.  
  212.       <p>If you want to use double quotes within this text, you have to
  213.       write them as <code>&quot;</code>.</p></dd>
  214.       </dl>
  215.  
  216.     </section>
  217. </section>
  218.  
  219. <section id="example"><title>Example Mapfile</title>
  220.  
  221.     <example>
  222.       #Comments are printed in a 'formatted' or 'semiformatted' menu.<br />
  223.       #And can contain html tags. <hr><br />
  224.       base referer<br />
  225.       poly map "Could I have a menu, please?" 0,0 0,10 10,10 10,0<br />
  226.       rect .. 0,0 77,27 "the directory of the referer"<br />
  227.       circle http://www.inetnebr.com/lincoln/feedback/ 195,0 305,27<br />
  228.       rect another_file "in same directory as referer" 306,0 419,27<br />
  229.       point http://www.zyzzyva.com/ 100,100<br />
  230.       point http://www.tripod.com/ 200,200<br />
  231.       rect mailto:nate@tripod.com 100,150 200,0 "Bugs?"<br />
  232.     </example>
  233.  
  234. </section>
  235.  
  236. <section id="referencing"><title>Referencing your mapfile</title>
  237.  
  238.     <example><title>HTML example</title>
  239.       <a href="/maps/imagemap1.map"><br />
  240.       <indent>
  241.         <img ismap src="/images/imagemap1.gif"><br />
  242.       </indent>
  243.       </a>
  244.     </example>
  245.  
  246.     <example><title>XHTML example</title>
  247.       <a href="/maps/imagemap1.map"><br />
  248.       <indent>
  249.         <img ismap="ismap" src="/images/imagemap1.gif" /><br />
  250.       </indent>
  251.       </a>
  252.     </example>
  253.  
  254. </section>
  255.  
  256. <directivesynopsis>
  257. <name>ImapMenu</name>
  258. <description>Action if no coordinates are given when calling
  259. an imagemap</description>
  260. <syntax>ImapMenu none|formatted|semiformatted|unformatted</syntax>
  261. <contextlist><context>server config</context><context>virtual host</context>
  262. <context>directory</context><context>.htaccess</context></contextlist>
  263. <override>Indexes</override>
  264.  
  265. <usage>
  266.     <p>The <directive>ImapMenu</directive> directive determines the
  267.     action taken if an imagemap file is called without valid
  268.     coordinates.</p>
  269.  
  270.     <dl>
  271.       <dt><code>none</code></dt>
  272.       <dd>If ImapMenu is <code>none</code>, no menu is generated,
  273.       and the <code>default</code> action is performed.</dd>
  274.  
  275.       <dt><code>formatted</code></dt>
  276.       <dd>A <code>formatted</code> menu is the simplest menu.
  277.       Comments in the imagemap file are ignored. A level one header
  278.       is printed, then an hrule, then the links each on a separate
  279.       line. The menu has a consistent, plain look close to that of
  280.       a directory listing.</dd>
  281.  
  282.       <dt><code>semiformatted</code></dt>
  283.       <dd>In the <code>semiformatted</code> menu, comments are
  284.       printed where they occur in the imagemap file. Blank lines
  285.       are turned into HTML breaks. No header or hrule is printed,
  286.       but otherwise the menu is the same as a
  287.       <code>formatted</code> menu.</dd>
  288.  
  289.       <dt><code>unformatted</code></dt>
  290.       <dd>Comments are printed, blank lines are ignored. Nothing is
  291.       printed that does not appear in the imagemap file. All breaks
  292.       and headers must be included as comments in the imagemap
  293.       file. This gives you the most flexibility over the appearance
  294.       of your menus, but requires you to treat your map files as
  295.       HTML instead of plaintext.</dd>
  296.     </dl>
  297. </usage>
  298. </directivesynopsis>
  299.  
  300. <directivesynopsis>
  301. <name>ImapDefault</name>
  302. <description>Default action when an imagemap is called with coordinates
  303. that are not explicitly mapped</description>
  304. <syntax>ImapDefault error|nocontent|map|referer|<var>URL</var></syntax>
  305. <default>ImapDefault nocontent</default>
  306. <contextlist><context>server config</context><context>virtual host</context>
  307. <context>directory</context><context>.htaccess</context></contextlist>
  308. <override>Indexes</override>
  309.  
  310. <usage>
  311.     <p>The <directive>ImapDefault</directive> directive sets the default
  312.     <code>default</code> used in the imagemap files. Its value is
  313.     overridden by a <code>default</code> directive within the
  314.     imagemap file. If not present, the <code>default</code> action
  315.     is <code>nocontent</code>, which means that a <code>204 No
  316.     Content</code> is sent to the client. In this case, the client
  317.     should continue to display the original page.</p>
  318. </usage>
  319. </directivesynopsis>
  320.  
  321. <directivesynopsis>
  322. <name>ImapBase</name>
  323. <description>Default <code>base</code> for imagemap files</description>
  324. <syntax>ImapBase map|referer|<var>URL</var></syntax>
  325. <default>ImapBase http://servername/</default>
  326. <contextlist><context>server config</context><context>virtual host</context>
  327. <context>directory</context><context>.htaccess</context></contextlist>
  328. <override>Indexes</override>
  329.  
  330. <usage>
  331.     <p>The <directive>ImapBase</directive> directive sets the default
  332.     <code>base</code> used in the imagemap files. Its value is
  333.     overridden by a <code>base</code> directive within the imagemap
  334.     file. If not present, the <code>base</code> defaults to
  335.     <code>http://<var>servername</var>/</code>.</p>
  336. </usage>
  337. <seealso><directive module="core">UseCanonicalName</directive></seealso>
  338. </directivesynopsis>
  339.  
  340. </modulesynopsis>
  341.